#include<vector>
#include<algorithm>
class Solution {
public:
    void moveZeroes(std::vector<int>& nums) {
        if(nums.size()==0)
        {
            return;
        }
        int cur=0;
        int dest =-1;
        for(;cur<nums.size();cur++)
        {
            if(nums[cur]!=0)
            {
                std::swap(nums[++dest],nums[cur]);
            }
        }
    }
};